import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:ff_flutter/screens/home/widgets/popular_live_room.dart';
import 'package:ff_flutter/screens/home/widgets/download_button.dart';
import 'package:ff_flutter/screens/home/widgets/notification_button.dart';
import 'package:ff_flutter/screens/home/widgets/big_popular_live_room.dart';
import 'package:ff_flutter/screens/home/widgets/tab_bar/index.dart';

class HomeScreenWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return SingleChildScrollView(
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          // 顶部状态栏留空
          SizedBox(height: MediaQuery.of(context).padding.top),
          // Free Friend 和下载按钮
          Padding(
            padding: EdgeInsets.symmetric(horizontal: 32.w),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                Text(
                  "Free Friend",
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 48.sp,
                    fontWeight: FontWeight.bold,
                  ),
                ),
                Row(
                  children: [
                    DownloadButton(),
                    SizedBox(width: 24.w),
                    NotificationButton(),
                  ],
                ),
              ],
            ),
          ),
          SizedBox(height: 32.h),
          // 地区选择
          Padding(
            padding: EdgeInsets.symmetric(horizontal: 32.w),
            child: Row(
              children: [
                Container(
                  width: 64.w,
                  height: 64.h,
                  decoration: BoxDecoration(
                    color: const Color(0xFFE7568C),
                    borderRadius: BorderRadius.circular(16.r),
                  ),
                  child: Icon(
                    Icons.location_on,
                    color: Colors.white,
                    size: 36.sp,
                  ),
                ),
                SizedBox(width: 16.w),
                Text(
                  "America",
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 48.sp,
                    fontWeight: FontWeight.bold,
                  ),
                ),
              ],
            ),
          ),
          SizedBox(height: 32.h),
          // Popular Live Room 组件
          PopularLiveRoom(),
          BigPopularLiveRoom(),
          HomeTabBar(),
        ],
      ),
    );
  }
}
